<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <#include "/header.html">

    <!-- 引入select2 -->
    <link href="${request.contextPath}/statics/plugins/select2/css/select2.css" rel="stylesheet" />
    <script src="${request.contextPath}/statics/plugins/select2/js/select2.js"></script>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="关键字">
            </div>

            <div class="form-group">
                <label style="height: 35px;line-height: 35px;float:left;">域名</label>
                <div class="col-sm-1">
                    <select id="wx_select"  @change="clickOption" class="selectpicker show-tick form-control"  data-width="60%" title='请选择域名(必选)' >

                    </select>
                </div>
            </div>

            <a class="btn btn-default" @click="query">查询</a>

			<!--<#if shiro.hasPermission("api:weixinno:save")>-->
            <!--<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>-->
			<!--</#if>-->
			<#if shiro.hasPermission("api:weixinno:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<!--<#if shiro.hasPermission("api:weixinno:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>-->
            <a class="btn btn-primary" @click="importUrl"><i class="fa fa-trash-o"></i>&nbsp;载入链接</a>
            <!--<a class="btn btn-primary" @click="reloadUrl"><i class="fa fa-trash-o"></i>&nbsp;刷新URL链接</a>-->
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal layui-form">

            <div class="form-group">
                <div class="col-sm-2 control-label">来源名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="weixinNo.dnsname" placeholder="来源名称"/>
                    <!--<span style="color:red;">推广链接不可重复</span>-->
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">微信号</div>
                <div class="col-sm-10">
                    <!--onchange="vm.selectDivChange()"-->
                    <select v-model="wxno" class="selectpicker show-tick form-control"  data-width="50%" title='请选择微信(必选)'  id="select2div" style="min-width: 30%">
                        <option v-for="(item,index) of wexnoList" :url="item.url" :key="index" :value="item.name">{{item.name}}</option>
                    </select>
                </div>
            </div>


           <!-- <div class="form-group">
                <div class="col-sm-2 control-label">微信号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="weixinNo.wxno" placeholder="微信号"/>
                </div>
            </div> -->


                    <div class="form-group">
                        <div class="col-sm-2 control-label">图片链接</div>
                        <div class="col-sm-10">
                            <input type="text" readonly="readonly" class="form-control" v-model="weixinNo.picture" placeholder="图片链接"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">服务器路径</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" readonly="readonly" v-model="weixinNo.path" placeholder="访问路径（访问路径与域名，与服务器路径，不可重复）"/>
                        </div>
                    </div>

                    <div class="form-group" style="display: none">
                        <div class="col-sm-2 control-label">访问域名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" readonly="readonly" v-model="weixinNo.url" placeholder="访问域名"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">访问域名名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" readonly="readonly" v-model="weixinNo.dnsname" placeholder="访问域名名称"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">访问链接</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.linkurl" placeholder="访问链接"/>
                        </div>
                    </div>

											                    <div style="display: none" class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.createtime" placeholder="创建时间"/>
                        </div>
                    </div>

                    <div style="display: none" class="form-group">
                        <div class="col-sm-2 control-label">更新时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.updatetime" placeholder="更新时间"/>
                        </div>
                    </div>

                    <div style="display: none" class="form-group">
                        <div class="col-sm-2 control-label">操作人</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.operater" placeholder="操作人"/>
                        </div>
                    </div>

                    <div style="display: none" class="form-group">
                        <div class="col-sm-2 control-label">路径</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.path" placeholder="路径"/>
                        </div>
                    </div>

					<div class="form-group">
                        <div class="col-sm-2 control-label">备注</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="weixinNo.remark" placeholder="备注"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>


<script src="${request.contextPath}/statics/js/modules/api/weixinno.js?_${.now?long}"></script>


</body>
</html>